#!/usr/bin/env python
# -*- coding: utf-8 -*-

def fn(n=12):
    if n > 0:
       n=int(n)
       for line in range(1,n+1):
           for row in range(n,0,-1):
               if row > line:
                  print(" " * len(str(row)),end=' ')
               else:
                  print(row,end=' ')
           print()
       print('-' * 50)
       for line in range(n,0,-1):
           for row in range(n,0,-1):
               if row > line:
                  print(" " * len(str(row)),end=' ')
               else:
                 print(row,end=' ')
           print()
    else:
       print("参数必须为大于0的正整数")

    
fn()

# 这一版完成的可以，不过n =int(n)，这个操作可以不写，因为默认是传入int类型了
